package com.yellowpage.sample.data;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

/**
 * News entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "WEB_NEWS")
public class News implements java.io.Serializable {

	// Fields

	private Long newsId;
	private Long htmlTemplateId;
	private String title;
	private String content;
	private Date pubTime;
	private Date createTime;
	private Long createUser;
	private Date lastUpdateTime;
	private Long lastUpdateUser;
	private String status;

	// Constructors

	/** default constructor */
	public News() {
	}

	/** full constructor */
	public News(Long htmlTemplateId, String title, String content,
			Date pubTime, Date createTime, Long createUser,
			Date lastUpdateTime, Long lastUpdateUser, String status) {
		this.htmlTemplateId = htmlTemplateId;
		this.title = title;
		this.content = content;
		this.pubTime = pubTime;
		this.createTime = createTime;
		this.createUser = createUser;
		this.lastUpdateTime = lastUpdateTime;
		this.lastUpdateUser = lastUpdateUser;
		this.status = status;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "identity")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "NEWS_ID", unique = true, nullable = false, precision = 18, scale = 0)
	public Long getNewsId() {
		return this.newsId;
	}

	public void setNewsId(Long newsId) {
		this.newsId = newsId;
	}

	@Column(name = "HTML_TEMPLATE_ID", precision = 18, scale = 0)
	public Long getHtmlTemplateId() {
		return this.htmlTemplateId;
	}

	public void setHtmlTemplateId(Long htmlTemplateId) {
		this.htmlTemplateId = htmlTemplateId;
	}

	@Column(name = "TITLE", length = 64)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "CONTENT", length = 256)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "PUB_TIME", length = 7)
	public Date getPubTime() {
		return this.pubTime;
	}

	public void setPubTime(Date pubTime) {
		this.pubTime = pubTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CREATE_TIME", length = 7)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Column(name = "CREATE_USER", precision = 18, scale = 0)
	public Long getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(Long createUser) {
		this.createUser = createUser;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LAST_UPDATE_TIME", length = 7)
	public Date getLastUpdateTime() {
		return this.lastUpdateTime;
	}

	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}

	@Column(name = "LAST_UPDATE_USER", precision = 18, scale = 0)
	public Long getLastUpdateUser() {
		return this.lastUpdateUser;
	}

	public void setLastUpdateUser(Long lastUpdateUser) {
		this.lastUpdateUser = lastUpdateUser;
	}

	@Column(name = "STATUS", length = 10)
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

}